import 'package:flutter/cupertino.dart';

/// Author: Shper
/// Created: 2023-08-10

typedef GTFurnaceRouteFactory = Route<Object?>? Function(RouteSettings settings);

GTFurnaceRouteFactory routeFactoryWrapper(GTFurnaceRouteFactory routeFactory) {
  return (settings) {
    var route = routeFactory(settings);
    if (route == null && settings.name == '/') {
      route = PageRouteBuilder<Object?> (
          settings: settings, pageBuilder: (_, __, ___) => Container());
    }
    return route;
  };
}
